<%@include file="taglibs/taglibs.jsp"%>
<html>
<head>
	<%@include file="pieces/header.jsp"%>
	<meta name="description" content="Hello File">
</head>
<body>
<li><a href="/index">home</a></li>
<div class="container">
	<h1 class="alert-info">clients</h1>
  <jsp:include page="pieces/mainMenue.jsp" />
  <form:form action="account" modelAttribute="accountForm" >
   <table border="2">
     <tr>
       <td>id</td>
       <td>name</td>
       <td> startDate</td>
       <td> endDate</td>
       <td>client</td>
       <td> Bank bank</td>
     </tr>
      <c:forEach var="account" items="${accounts}">
          <tr>
            <td><a href="/accounts/<c:out value="${account.id}" />"><c:out value="${account.id}"/></a></td>
            <td><c:out value="${account.name}"/></td>
            <td><c:out value="${account.startDate}"/></td>
            <td><c:out value="${account.endDate}"/></td>
            <td><a href="<c:out value="/clients/${account.client.id}" />"><c:out value="${account.client.name}"/></a></td>
            <td><c:out value="${account.bank.name}"/></td>
          </tr>
     </c:forEach>
     <%--<tr>--%>
       <%--<td><form:input path="id" /><form:errors path="id" cssClass="alert-danger" /></td>--%>
       <%--<td><form:input path="name" /><form:errors path="name" cssClass="alert-danger" /></td>--%>
       <%--<td><form:input path="date" /><form:errors path="date" cssClass="alert-danger" /></td>--%>
       <%--<td><input type="submit" value="add"/></td>--%>
     <%--</tr>--%>
   </table>
      <div class="alert-warning"><form:errors/></div>
  </form:form>


</div>
</body>
</html>
